package com.itheima.dao;

import com.itheima.domain.UserInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import java.util.List;


/**
 * @author Administrator
 * @Mapper 扫描单个dao
 * @Repository spring注解 将该接口加入到IOC容器中
 *
 */
public interface UserDao {

    @Select("select * from user")
    List<UserInfo> findAll();

    @Insert("insert into user() values(#{id},#{name},#{age},#{searchCount})")
    void insert(UserInfo userInfo);
}
